home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
C/C++ Interactive Reference Guide
/
C-C++ Interactive Reference Guide.iso
/
c_ref
/
csource1
/
cenvid
/
errlev.bat
< prev
next >
Wrap
DOS Batch File
|
1993-09-20
|
887b
|
18 lines
@echo off
REM ************************************************************************
REM *** ERRLEV.BAT - Call a program, passing up to 8 parameters, and ***
REM *** set the ERRLEV environment variable from the return ***
REM *** Code of that program. Also return with ERRORLEVEL ***
REM *** set as if the program was run directly from the ***
REM *** command prompt or from a batch file. ***
REM ************************************************************************
if not "%1" == "" GOTO RUN_ERRLEV
ECHO ERRLEV - Call a program, passing up to 8 paramters. Sets ERRLEV environment
ECHO variable to the value returned. Also set ERRORLEVEL for batch file.
ECHO Example: ERRLEV CHKDSK C:
:RUN_ERRLEV
CEnvi return(ERRLEV = spawn(P_WAIT,`%1 %2 %3 %4 %5 %6 %7 %8 %9`));